package com.sinothk.fc.storeMaterial.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sinothk.fc.storeMaterial.entity.StoreMaterialClassifyVO;
import com.sinothk.fc.storeMaterial.entity.StoreMaterialEntity;
import com.sinothk.fc.storeMaterial.entity.StoreMaterialSearchReq;
import com.sinothk.fc.storeMaterialRecord.entity.StoreMaterialRecordEntity;

import java.util.ArrayList;

/**
 * @Description: 商品物料表
 * @Author: Liangyt
 * @Date:   2022-09-23
 * @Version: V1.0
 */
public interface IStoreMaterialService extends IService<StoreMaterialEntity> {

    IPage<StoreMaterialClassifyVO> listForClassify(Page<StoreMaterialEntity> page, StoreMaterialSearchReq searchReq) throws Exception;

    IPage<StoreMaterialEntity> listForBarCode(Page<StoreMaterialEntity> page, StoreMaterialSearchReq searchReq) throws Exception;

    StoreMaterialRecordEntity addStockNum(StoreMaterialEntity beanReq) throws Exception;

    StoreMaterialRecordEntity add(StoreMaterialEntity goodsMaterial) throws Exception;

    ArrayList<StoreMaterialRecordEntity> addBatch(ArrayList<StoreMaterialEntity> materialList);

    void goodsMaterialUsed(String materialId, int goodsNum) throws Exception;
}
